package com.tanhua.dubbo.api;

import com.tanhua.model.enums.CommentType;
import com.tanhua.model.mongo.Comment;
import com.tanhua.model.vo.PageResult;
import org.bson.types.ObjectId;

import java.util.List;

/**
 * @author ck
 * @date 2021/11/15 13:13
 */
public interface CommentApi {

    //发布评论并且获取评论数量
    Integer save(Comment comment1);

    //分页查询
    List<Comment> findCommentList(String movementId, CommentType comment, Integer page, Integer pagesize);


    boolean hasLiked(String movementId, Long userId, CommentType like);

    public Integer delete(Comment comment);

    boolean hasLoved(String movementId, Long userId, CommentType love);

    Integer likevAndUnlike(String commentId, String type);

    List<Comment> findList(Long userId);

    List<Comment> findLoveList(Long userId);

    List<Comment> findCommentsList(Long userId);

    PageResult findComment(Integer page, Integer pagesize, ObjectId publishId);
}
